MZoom SrcX.q,SrcY.q,XAdd.q,YAdd.q,DestX.w,DestY.w,OpWidth.w,OpHeight.w,DeRes?.w[,SrcBmap.w[,CustomOffsets.l]]

Performs a zoom operation on a section of a source bitmap and places it into the
destination bitmap at a different size. SrcX.q and SrcY.q specify the coordinate
of the top left corner within the source image at which to start reading. Note
that these are .quick values so fractional starting positions are possible.
XAdd.q and YAdd.q are .quick values which are incremented to the SrcX.q and
SrcY.q variables for each pixel in the operation to move through the source
image at a specific rate. Note that there are optimised routines for when either
or both adders have no fractional part (ie are whole numbers), which is
particularly faster when XAdd.q has no fractional part, and will also be faster
if you can live with an OpWidth that is a multilpe of 4, or better even a
multilpe of 16. XAdd and YAdd of 1.0 causes the equivelent of a straight
`scroll' of the image, although slower than normal scrolls. DestX.w and
DestY.w are the coordinates of the top left corner of the area to be zoomed in
the destination. These are integer values and correspond to a precice pixel
coordinate. OpWidth.w is the width of the operation in whole pixels and
OpHeight.w is the height of the operation in whole pixels. This defines the
area in the destination that will be rendered to. You can optionally specify
a source bitmap to use, otherwise the source and destination will be the same
bitmap. If you specify CustomOffsets.l a special zoom will be performed which
reads values from a list in order to perform different zoom factors for each
row. The list should contain groups of OpWidth.w,DestXOffset.w,SrcXOffset.q,
XAddOffset.q,YAddOffset.q. Each set of 5 variables represents values to use
for a single row of the zoom. OpWidth.w is the absolute width of the operation
in whole pixels, and represents the number of pixels to be zoomed on a given
row. DestXOffset.w is a relative offset in the destination, relative to the
DestX coordinate of the previous row. An offset of 0 on every line causes a
normal zoom whereas an offset of 1 on every line would shear the area at 45
degrees. SrcXOffset.q is a relative value to add to the X coordinate of the start
of the row in the source, relative to the previous row. For a straight verticle
edge you would have an offset of 0 for each row. Note that SrcXOffset.q is a
.quick value so can be a fractional amount. XAddOffset.q is a relative value to
add to the XAdd.q variable for the given row, relative to the previous value of
XAdd.q. A XAddOffset of 0 produces an evenly distributed zoom whereas a
XAddOffset of something like 0.001 may cause the zoom effect to stretch
horizontally as the processing travels from left to right on a row. YAddOffset.q
is a relative value to add to the YAdd.q variable for the given row, relative to
the previous value of YAdd.q. A YAddOffset of 0 produces an evenly distributed
zoom whereas a YAddOffset of something like 0.001 may cause the zoom effect to
stretch vertically as the processing travels from top to bottom. The DeRes.w
parameter should be used to tell Mildred what type of zoom to perform. Normally
this should be set to False or 0, to indicate that a normal zoom will occur. If
you specify DeRes.w as True or <>0 a de-resolution effect will occur.
De-resolution means a decrease in the resolution of the image, but without a
change to its overall size. OpWidth and OpHeight will define the size of the
image to be affected, and the zoom effect dictates the resolution. What would
originally have been a zoomed `pixel' will now become an solid block of colour on
the image, of the same size but covering several pixels rather than representing
just one. Note that there are optimised routines for when the OpWidth is a
multiple of 4, 16, when the adders are integers and when the Y adder is 1.0
(for a much faster Y zoom/deres). It is also possible to use DeRes.w=True in
combination with CustomOffsets.l to provide different levels of de-resolution on
each line.



converted with guide2html by Kochtopf